import { IParam } from '../../common';
import { IMDViewAbilityBase } from '../ability/i-md-view-ability-base';
import { IMDViewStoreBase } from '../store';
import { IViewController } from './i-view-controller';

/**
 * 多数据视图控制器基类
 *
 * @export
 * @interface IMDViewController
 * @extends {IViewController<T, A>}
 * @template T 仓库数据接口
 * @template A 视图能力接口
 */
export interface IMDViewControllerBase<
	S extends IMDViewStoreBase,
	A extends IMDViewAbilityBase
> extends IViewController<S, A> {
	/**
	 * 处理快速分组值变化
	 *
	 * @param {IParam} item
	 * @memberof IMDViewController
	 */
	handleQuickGroupValueChange(item: IParam): void;

	/**
	 * 切换过滤器
	 *
	 * @memberof IMDViewController
	 */
	toggleFilter(): void;

	/**
	 * 搜索
	 *
	 * @param {string} searchValue
	 * @memberof IMDViewController
	 */
	search(searchValue: string): void;
}
